package com.tong.service.user;

import com.tong.dao.BookMapper;
import com.tong.dao.UserMapper;
import com.tong.pojo.Books;
import com.tong.pojo.Users;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("UserServiceImpl")
public class UserServiceImpl implements UserService{

    //调用dao层的操作，设置一个set接口，方便Spring管理
    private UserMapper userMapper;

    public void setUserMapper(UserMapper userMapper) {
        this.userMapper = userMapper;
    }

    @Override
    public List<Users> queryAllUser() {
        return userMapper.queryAllUser();
    }

    @Override
    public int deleteUser(String username) {
        return userMapper.deleteUser(username);
    }

    @Override
    public int addUser(Users users) {
        return userMapper.addUser(users);
    }
}